home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
mathstud.zip
/
TRIL.M
< prev
next >
Wrap
Text File
|
1993-03-23
|
277b
|
15 lines
function Y = tril(X,k)
%Y=tril(X,k)
%Lower triangle matrix of X
% S.Halevy 7/31/92
% Copyright (c) 1992 by the MathWizards
k=expr_sel(nargin==1,0,k);
[m,n] = size(X);
Y = zeros(m,n);
for i = max(1,1-k):m
j = 1:min(n,i+k);
Y(i,j) = X(i,j);
end